import {
	req
} from './config.js'
export function getSelectList(IP, lFuncNo, lPhone, lstatus, startTime, endTime, strwhere) {
	return req.ajax({
		path: '/selectList',
		title: '加载中...',
		data: {
			IP,
			lFuncNo,
			lPhone,
			lstatus,
			startTime,
			endTime,
			strwhere
		},
	})
}

export function getchievements(lusercode,year,moth,day,ltype) { // 绩效查询
	return req.ajax({
		path: '/chievements',
		header: {
			'token': uni.getStorageSync('token')
		},
		title: '加载中...',
		data: {
			lusercode,
			year,
			moth,
			day,
			ltype
		},
	})
}
export function getselectForm1(lid) {
	return req.ajax({
		path: '/selectForm1',
		title: '加载中...',
		data: {
			lid
		},
	})
}
export function getrequestReport(lusercode, ltype, lprctype) {
	return req.ajax({
		path: '/requestReport1',
		title: '加载中...',
		data: {
			lusercode,
			ltype,
			lprctype
		},
	})
}
export function outputRecord(lid, record, output, recordDate) {
	return req.ajax({
		path: '/outputRecord',
		title: '加载中...',
		data: {
			lid,
			record,
			output,
			recordDate
		},
	})
}
export function getSelect(lfuncno, startTime, endTime, strwhere) {
	return req.ajax({
		path: '/select',
		title: '加载中...',
		method: 'POST',
		dataType: 'json',
		header: {
			'content-type': 'application/json;charset=UTF-8',
			'token': uni.getStorageSync('token')
		},
		data: {
			lfuncno,
			startTime,
			endTime,
			strwhere
		},
	})
}
export function getSelect2(lfuncno, strwhere) {
	return req.ajax({
		path: '/select',
		title: '加载中...',
		method: 'POST',
		dataType: 'json',
		header: {
			'content-type': 'application/json;charset=UTF-8',
			'token': uni.getStorageSync('token')
		},
		data: {
			lfuncno,
			strwhere
		},
	})
}
export function getfindItemLtype(IP, lmobile, lbarcode, ltype) {
	return req.ajax({
		path: '/findItemLtype',
		title: '加载中...',
		data: {
			IP,
			lmobile,
			lbarcode,
			ltype,
		},
	})
}
export function getselectDeitialList(IP, lFuncNo, strwhere) {
	return req.ajax({
		path: '/selectDeitialList',
		title: '加载中...',
		data: {
			IP,
			lFuncNo,
			strwhere,
		},
	})
}
export function getselectBulletin(beginDate, endDate, lstaterun) {
	return req.ajax({
		path: '/selectBulletin',
		title: '加载中...',
		data: {
			beginDate,
			endDate,
			lstaterun
		},
	})
}
export function getselectDeitial(lfuncno, lposition, strwhere) {
	return req.ajax({
		path: '/selectDetial',
		title: '加载中...',
		method: 'POST',
		dataType: 'json',
		header: {
			'content-type': 'application/json;charset=UTF-8',
			'token': uni.getStorageSync('token')
		},
		data: {
			lfuncno,
			lposition,
			strwhere,
		},
	})
}
export function getUserStaple(lusercode) {
	return req.ajax({
		path: '/getUserStaple',
		data: {
			lusercode
		},
	})
}
export function deleteUserStaple(lid) {
	return req.ajax({
		path: '/deleteUserStaple',
		title: '加载中...',
		data: {
			lid
		},
	})
}
export function getselectReferList(lfuncno, lposition, lfiledname, strwhere) {
	return req.ajax({
		path: '/selectRefer',
		title: '加载中...',
		method: 'POST',
		dataType: 'json',
		header: {
			'content-type': 'application/json;charset=UTF-8',
			'token': uni.getStorageSync('token')
		},
		data: {
			lfuncno,
			lposition,
			lfiledname,
			strwhere
		},
	})
}
export function OA(lusercode, beginDate, endDate) {
	return req.ajax({
		path: '/oa',
		title: '加载中...',
		data: {
			lusercode,
			beginDate,
			endDate
		},
	})
}
export function getQRcode(b, e, m, u) {
	return req.ajax({
		path: '/getQRcode',
		title: '加载中...',
		method: 'POST',
		dataType: 'json',
		header: {
			'content-type': 'application/json;charset=UTF-8',
			'token': uni.getStorageSync('token')
		},
		data: {
			b,
			e,
			m,
			u
		},
	})
}
export function getMinuteInfo(machineno, item, type) {
	return req.ajax({
		path: '/minuteInfo/info',
		title: '加载中...',
		data: {
			machineno,
			item,
			type
		},
	})
}
export function getMachineList(machineType) {
	return req.ajax({
		path: '/getMachineList',
		title: '加载中...',
		data: {
			machineType
		},
	})
}
//机器使用频率
export function getuseHZ(procedure) {
	return req.ajax({
		path: '/minuteInfo/useHZ',
		title: '加载中...',
		data: {
			procedure
		},
	})
}
//机器信息
export function getworkInquire(lid) {
	return req.ajax({
		path: '/workInquire',
		title: '加载中...',
		header: {
			'token': uni.getStorageSync('token')
		},
		data: {
			lid
		},
	})
}

//审核通过
export function getAudit(lid, moduleno, lusercode, staterun, auditrecord) {
	return req.ajax({
		path: '/Audit',
		title: '加载中...',
		header: {
			'token': uni.getStorageSync('token')
		},
		data: {
			lid,
			moduleno,
			lusercode,
			staterun,
			auditrecord
		},
	})
}
//驳回消息接口
export function getreject(lid, lmoduleno, lusercode, lstaterun, lreason) {
	return req.ajax({
		path: '/reject',
		title: '加载中...',
		header: {
			'token': uni.getStorageSync('token')
		},
		data: {
			lid,
			lmoduleno,
			lusercode,
			lstaterun,
			lreason
		},
	})
}
//粗纱图表接口
export function getReport(ltype, lmachineno, lclassindex, lbegindate, lenddate) {
	return req.ajax({
		path: '/requestReport',
		title: '加载中...',
		header: {
			'token': uni.getStorageSync('token')
		},
		data: {
			ltype,
			lmachineno,
			lclassindex,
			lbegindate,
			lenddate
		},
	})
}